//--------------------------------------------------------------
//
// Qizhi Zhang 
// ezhung@gmail.com
// http://www.moorwind.com
//
//--------------------------------------------------------------
package reader.model.factory
{
	import reader.core.ReaderError;
	import reader.model.IDataProxy;
	import reader.model.IDraftProxy;
	import reader.model.IServiceProxy;
	import reader.model.IUserProxy;
	
	public class ProxyFactory
	{
		//////////////////////////////////////////////////////////////////////////////
		//public properties
		
		public static const APP_SQLITE:int = 1;
		public static const APP_XML:int = 2;
		public static const APP_REST:int = 3;
		
		public function get userProxy():IUserProxy
		{
			throw new ReaderError(ReaderError.ABSTRACT_ERROR);
			return null;
		}
		
		public function get userProxyName():String
		{
			throw new ReaderError(ReaderError.ABSTRACT_ERROR);
			return null;
		}
		
		public function get dataProxy():IDataProxy
		{
			throw new ReaderError(ReaderError.ABSTRACT_ERROR);
			return null;
		}
		
		public function get dataProxyName():String
		{
			throw new ReaderError(ReaderError.ABSTRACT_ERROR);
			return null;
		}
		
		public function get draftProxy():IDraftProxy
		{
			throw new ReaderError(ReaderError.ABSTRACT_ERROR);
			return null;
		}
		
		public function get draftProxyName():String
		{
			throw new ReaderError(ReaderError.ABSTRACT_ERROR);
			return null;
		}
		
		public function get serviceProxy():IServiceProxy
		{
			throw new ReaderError(ReaderError.ABSTRACT_ERROR);
			return null;
		}
		
		public function get serviceProxyName():String
		{
			throw new ReaderError(ReaderError.ABSTRACT_ERROR);
			return null;
		}
		
		////////////////////////////////////////////////////////////////////////////////
		//methods
		
		public static function getProxyFactory(whichProxyFactory:int):ProxyFactory
		{
			switch(whichProxyFactory)
			{
				case APP_SQLITE:
					return new SqliteProxyFactory();
				default :
					return null;	
			}
		}

	}
}